<body>
<?php
$conn = pg_connect("user=curso_admin password=postgres dbname=midb");

$q = "SELECT id, nombre, size FROM logos";
$r = pg_query($conn, $q);

while ($logo = pg_fetch_assoc($r) ) {
	?>
	Nombre: <?php echo $logo['nombre'];?><br>
	Tamaño: <?php echo $logo['size'];?> bytes.<br>
	<img src="mostrar_foto.php?id=<?php echo $logo['id'];?>"><br>
	<hr>
	<?php 
}
?>
</body>
